QuickTime 3 Reference

| Previous | Chapter contents | Chapter top | Section top | Next |

Importing Movie Data

This section describes new functions provided by movie data import components.

MovieImportGetFileType

The MovieImportGetFileType allows your movie data import component to tell the Movie Toolbox the appropriate file type for the most-recently imported movie file.

pascal ComponentResult MovieImportGetFileType (MovieImportComponent ci, OSType *fileType);
ci
Identifies the Movie Toolbox's connection to your movie data import component.
fileType
Contains a pointer to an OSType field. Your component should place the file type value that best identifies the movie data just imported. For example, Apple's Audio CD movie data import component sets this field to 'AIFF' whenever it creates an AIFF file instead of a movie file.

DISCUSSION

You should implement this function only if your movie data import component creates files other than QuickTime movies. By default, the Movie Toolbox makes new files movies, unless you override that default by providing this function.

Result CODES

badComponentSelector

0x80008002

Function not supported

MovieImportGetAuxiliaryDataType

The MovieImportGetAuxiliaryDataType function returns the type of the auxiliary data that it can accept. For example, calling the text import component with MovieImportGetAuxiliaryDataType indicates that the text import component will use 'styl' information in addition to 'TEXT' data.

pascal ComponentResult MovieImportGetAuxiliaryDataType(
                     MovieImportComponent ci,
                     OSType *auxType);
ci
Specifies the movie import component for the request. Applications obtain this reference from the Component Manager's OpenComponent function.
auxType
A pointer to the type of auxiliary data it can import.

RESULT Codes

badComponentInstance

0x80008001

Invalid movie import component instance

badComponentSelector

0x80008002

Function not supported

MovieImportGetMIMETypeList

Returns a list of MIME types supported by the movie import component.

pascal ComponentResult MovieImportGetMIMETypeList (
                     MovieImportComponent ci,
                     QTAtomContainer *mimeInfo);
ci
Specifies an instance of a movie import component.
mimeInfo
A pointer to a MIME type list, a QT atom container that contains a list of MIME types supported by the movie import component. The MIME type list structure is described in "MIME Type List" .
The client should dispose of the atom container when finished with it.

DISCUSSION

Your movie import component can support MIME types that correspond to formats it supports. To make a list of these MIME types available to applications or other software, it must implement the MovieImportGetMIMETypeList function.

To indicate that your movie import component supports this function, set the hasMovieImportMIMEList flag in the componentFlags field of the component description record.

RESULT Codes

noErr

0

No error

paramErr

-50

Invalid parameter specified

memFullErr

-108

Not enough memory available

badComponentSelector

0x80008002

Component does not support the specified request code

MovieImportValidate

The MovieImportValidate function allows your movie data import component to validate the data to be passed to your component.

pascal ComponentResult MovieImportValidate(
                     MovieImportComponent ci,
                     const FSSpec *theFile,
                     Handle theData,
                     Boolean *valid);
ci
Specifies the movie import component for the request. Applications obtain this reference from the Component Manager's OpenComponent function.
theFile
Specifies the file to validate.
theData
Specifies the data to validate.
valid
Contains a pointer to a Boolean value. If the data and/or file is valid, this value returns true . Otherwise, it returns false .

DISCUSSION

Movie import components can implement this function to allow applications to determine if a given file or handle to data is acceptable for a particular import component. As this function may be called on many files, the validation process should be as fast as possible.

RESULT Codes

badComponentInstance

0x80008001

Invalid movie import component instance

badComponentSelector

0x80008002

Function not supported

MovieImportSetOffsetAndLimit

The MovieImportSetOffsetAndLimit function allows your application to import data from a part of a file rather than the entire file.

pascal ComponentResult MovieImportSetOffsetAndLimit(
                     MovieImportComponent ci,
                     unsigned long offset,
                     unsigned long limit);
ci
Specifies the movie import component for the request. Applications obtain this reference from the Component Manager's OpenComponent function.
offset
A byte offset into the file that indicates where the import operation begins.
limit
A byte offset into the file that indicates the last data in the file that can be imported.

DISCUSSION

The MovieImportSetOffsetAndLimit function is especially useful when one file format is embedded in another; it allows your application to skip header data for the enclosing file and begin importing data at the start of the desired format.

Not all movie import components support the MovieImportSetOffsetAndLimit function. Those that do include the movie import components for the kQTFileTypeAIFF , kQTFileTypeWave , and kQTFileMuLaw file types. Those that do not return the badComponentSelector result code in response to a MovieImportSetOffsetAndLimit call.

RESULT Codes

badComponentInstance

0x80008001

Invalid movie import component instance

badComponentSelector

0x80008002

Function not supported

MovieImportGetSettingsAsAtomContainer

The MovieImportGetSettingsAsAtomContainer routine retrieves the current settings from the movie import component.

pascal ComponentResult MovieImportGetSettingsAsAtomContainer (
                    MovieImportComponent ci,
                    QTAtomContainer *settings);
ci
The movie import component instance.
settings
The address where the reference to the newly created atom container should be stored by the call.

DISCUSSION

The caller is responsible for disposing of the returned QTAtomContainer.

MovieImportSetSettingsFromAtomContainer

The MovieImportSetSettingsFromAtomContainer routine sets the movie import component's current configuration from the passed settings data.

pascal ComponentResult MovieImportSetSettingsFromAtomContainer (
                    MovieImportComponent ci,
                    QTAtomContainer settings);
ci
The movie import component instance.
settings
Contains a QTAtomContainer reference to the settings.

DISCUSSION

The settings QTAtomContainer may contain atoms other than those expected by the particular component type or may be missing certain atoms. The function will only use settings it understands.


© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Section top | Next |